﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using KeywordAuction;

namespace Simulation.Strategy
{
    public class StrategyRaiseValue : Simulation.Strategy.ValueStrategyBase
    {
        public override bool Action(Advertiser advertiser)
        {
            foreach (var item in advertiser.Biddings)
            {
                item.Bid += Value;
            }
            return base.Action(advertiser);
        }
    }

    public class StrategyDropValue : Simulation.Strategy.ValueStrategyBase
    {
        public override bool Action(Advertiser advertiser)
        {
            foreach (var item in advertiser.Biddings)
            {
                if (item.Bid - Value < 0)
                {
                    return false;
                }
                item.Bid -= Value;
            }
            return base.Action(advertiser);
        }
    }
}
